import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
    name: 'incomePipe',
})
export class IncomePipe implements PipeTransform {

    transform(income) {
        let incomeNum = income*1;
        switch (incomeNum) {
            case 1:
                return '10万以下';
            case 2:
                return '10万-20万';
            case 3:
                return '20万-30万';
            case 4:
                return '30万-50万';
            case 5:
                return '50万-100万';
            case 6:
                return '100万以上';
            default:
                return '';
        }
    }
}
